package com.ssy.lingxi.sms.api.hystrix;

import com.ssy.lingxi.common.exception.BusinessException;
import com.ssy.lingxi.common.model.vo.PageVO;
import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.sms.api.entity.SmsConfig;
import com.ssy.lingxi.sms.api.feign.IConfigSmsFeign;
import com.ssy.lingxi.sms.api.model.SmsConfigVO;
import com.ssy.lingxi.sms.api.model.request.DeleteConfigRequest;
import com.ssy.lingxi.sms.api.model.request.SimpleIdRequest;
import com.ssy.lingxi.sms.api.model.request.TemplateRequest;
import com.ssy.lingxi.sms.api.model.response.TemplateResponse;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import java.util.HashMap;

/**
 * 短信服务器配置熔断服务实现类
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/6/15
 */
@Component
@Qualifier("smsServiceHystrix")
public class ConfigSmsHystrix implements IConfigSmsFeign {

    @Override
    public Wrapper<Integer> getServiceType() {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

    @Override
    public Wrapper<HashMap<String, String>> getParamCode(Integer serviceType) {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

    @Override
    public Wrapper<SmsConfig> getSmsConfig(Integer serviceType) {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

    @Override
    public Wrapper<Boolean> saveOrUpdateSmsConfig(SmsConfigVO smsConfigVO) {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

    @Override
    public Wrapper<Boolean> deleteSmsConfig(DeleteConfigRequest deleteConfigRequest) {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

    @Override
    public Wrapper<HashMap<String, String>> getModuleCode() {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

    @Override
    public Wrapper<PageData<TemplateResponse>> getSmsTemplateList(PageVO pageVO) {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

    @Override
    public Wrapper<Boolean> saveOrUpdateSmsTemplate(TemplateRequest templateVO) {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

    @Override
    public Wrapper<Boolean> deleteSmsTemplate(SimpleIdRequest simpleIdRequest) {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

    @Override
    public Wrapper<Boolean> clearSmsTemplate() {
        throw new BusinessException(ResponseCode.SERVICE_SMS_ERROR);
    }

}
